﻿using ApplicationLibrary.SqlConnector;
using System;

namespace Clothes.Items.ModuleData
{
    #region CL_Categories
    public class CL_Categories : Table
    {
        public static string Name = "CL_Categories";

        public static Column<string> CodeFather = new Column<string>(Name, "", "CodeFather", 2, false, false);
        public static Column<string> Code = new Column<string>(Name, "", "Code", 2, false, false);
        public static Column<string> Description = new Column<string>(Name, Properties.Resources.T_Description, "Description", LEN.BIG_DESCRIPTION);

        public override iColumn ForeignKey
        {
            get { return Code; }
        }

        public CL_Categories()
        {
            VisibleInRadar(new iColumn[] { Code, Description });
            Tablename = Name;
            DefineKey(new iColumn[] { Code });
        }
    }
    #endregion

    #region CL_Items
    public class CL_Items : Table
    {
        public static string Name = "CL_Items";

        public static Column<int> ID = new Column<int>(Name, Properties.Resources.T_Code, "ID", false, false);
        public static Column<string> Description = new Column<string>(Name, Properties.Resources.T_Description, "Description", 256);
        public static Column<int> Designer = new Column<int>(Name, "", "Designer");
        public static Column<int> Size = new Column<int>(Name, "", "Size");
        public static Column<int> Color = new Column<int>(Name, "", "Color");
        public static Column<int> Pattern = new Column<int>(Name, "", "Pattern");
        public static Column<int> Material = new Column<int>(Name, "", "Material");
        public static Column<string> Category = new Column<string>(Name, "", "Category", LEN.LONG_CODE);
        public static Column<int> Customer = new Column<int>(Name, "", "Customer");
        public static Column<DateTime> ReceivingData = new Column<DateTime>(Name, "", "ReceivingData");
        public static Column<Double> Price = new Column<Double>(Name, "", "Price");
        public static Column<bool> CanLowPrice = new Column<bool>(Name, "", "CanLowPrice");
        public static Column<int> LowPricePerc = new Column<int>(Name, "", "LowPricePerc");
        public static Column<Double> QuotePrice = new Column<Double>(Name, "", "QuotePrice");
        public static Column<ItemStatus> Status = new Column<ItemStatus>(Name, "", "Status");
        public static Column<DateTime> SoldDate = new Column<DateTime>(Name, "", "DateSale");
        public static Column<Double> PriceSale = new Column<Double>(Name, "", "PriceSale");
        public static Column<bool> BillOfLading = new Column<bool>(Name, "", "BillOfLading");
        public static Column<string> BillOfLadingNo = new Column<string>(Name, "", "BillOfLadingNo", LEN.CODE);
        public static Column<bool> Invoice = new Column<bool>(Name, "", "Invoice");
        public static Column<string> InvoiceNo = new Column<string>(Name, "", "InvoiceNo", LEN.CODE);
        public static Column<bool> ReturnToCustomer = new Column<bool>(Name, "", "ReturnToCustomer");
        public static Column<string> ReturnToCustomerNo = new Column<string>(Name, "", "ReturnToCustomerNo", LEN.CODE);
        public static Column<bool> Extended = new Column<bool>(Name, "", "Extended");
        public static Column<int> ExtendedDays = new Column<int>(Name, "", "ExtendedDays");
        public static Column<DateTime> DeadLineDate = new Column<DateTime>(Name, "", "DeadLineDate");
        public static Column<bool> Printed = new Column<bool>(Name, "", "Printed");

        public override iColumn ForeignKey
        {
            get { return ID; }
        }

        public CL_Items()
        {
            VisibleInRadar(new iColumn[] { ID, Description });
            Tablename = Name;
            DefineKey(new iColumn[] { ID });
        }
    }
    #endregion

}